#include "stdafx.h"
#include "csvariant.h"

CS_NAMESPACE_BEGIN

csVariant::csVariant(char c)
{
	m_data.c = c;
}

csVariant::csVariant(unsigned char uc)
{
	m_data.uc = uc;
}

csVariant::csVariant(short s)
{
	m_data.s = s;
}

csVariant::csVariant(signed char sc)
{
	m_data.sc = sc;
}

csVariant::csVariant(unsigned short us)
{
	m_data.us = us;
}

csVariant::csVariant(int i)
{
	m_data.i = i;
}

csVariant::csVariant(unsigned int ui)
{
	m_data.ui = ui;
}

csVariant::csVariant(long l)
{
	m_data.l = l;
}

csVariant::csVariant(unsigned long ul)
{
	m_data.ul = ul;
}

csVariant::csVariant(long long ll)
{
	m_data.ll = ll;
}

csVariant::csVariant(unsigned long long ull)
{
	m_data.ull = ull;
}

csVariant::csVariant(bool b)
{
	m_data.b = b;
}

csVariant::csVariant(double d)
{
	m_data.d = d;
}

csVariant::csVariant(float f)
{
	m_data.f = f;
}

char csVariant::toChar() const
{
	return m_data.c;
}

unsigned char csVariant::toUChar() const
{
	return m_data.uc;
}

short csVariant::toShort() const
{
	return m_data.s;
}

signed char csVariant::toSChar() const
{
	return m_data.sc;
}

unsigned short csVariant::toUShort() const
{
	return m_data.us;
}

int csVariant::toInt() const
{
	return m_data.i;
}

unsigned int csVariant::toUInt() const
{
	return m_data.ui;
}

long csVariant::toLong() const
{
	return m_data.l;
}

unsigned long csVariant::toULong() const
{
	return m_data.ul;
}

long long csVariant::toLongLong() const
{
	return m_data.ll;
}

unsigned long long csVariant::toULongLong() const
{
	return m_data.ull;
}

bool csVariant::toBool() const
{
	return m_data.b;
}

double csVariant::toDouble() const
{
	return m_data.d;
}

float csVariant::toFloat() const
{
	return m_data.f;
}

CS_NAMESPACE_END
